<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ taglib uri="/WEB-INF/myfaces_sandbox.tld"   prefix="s" %>

<%@ page import="javax.faces.context.FacesContext" %>


<f:view >
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it-it" lang="it-it" dir="ltr" >
        <head>			
            <title>Autolinee Moretti</title>

            <!-- Stile Bootstrap -->
            <meta name="viewport" content="width=device-width, initial-scale=1.0">		
                <link href="css/bootstrap.css" rel="stylesheet">	
                    <link rel="stylesheet" href="./moretti.css" type="text/css">
                        <link href="http://fonts.googleapis.com/css?family=Alegreya+Sans+SC" rel="stylesheet" type="text/css">
                            <link href="http://fonts.googleapis.com/css?family=Alef" rel="stylesheet" type="text/css">

                                <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
                                <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
                                <!--[if lt IE 9]>
                                  <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
                                  <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
                                <![endif]-->

                                <!-- Stile bxSlider -->
                                <link href="css/jquery.bxslider.css" rel="stylesheet">		

                                    <!-- Stile personalizzato -->
                                    <link href="css/style.css" rel="stylesheet">		

                                        <link href="immagini/favicon.ico" rel="shortcut icon" type="image/x-icon" />
                                        </head>

                                        <body>

                                            <div class="container">
                                                <div class="row">
                                                    <div class="col-md-8">
                                                        <h1 class="navbar-brand navbar-brand_">
                                                            <a href="home.jsf"><img style="width:100%" alt="Autolinee Moretti" src="immagini/logo.png"></a>			
                                                        </h1>
                                                    </div>

                                                    <div class="col-md-1">&nbsp;</div>

                                                    <div class="col-md-3">
                                                        <div class="header_right">
                                                            <form enctype="application/x-www-form-urlencoded" action="/Moretti/home.jsf" method="post" name="form" id="form" target=""> 
                                                                <table width="100%" background="image/sfondo00016.gif" align="center" cellspacing="5" cellpadding="0" class="login">
                                                                    <tbody>

                                                                        <h:form id="form" > 
                                                                            <t:saveState value="#{beanAppPrenotazione}"/>            

                                                                            <table align="center" cellpadding="0" cellspacing="5" class="login" height="50" width="500" background="image/sfondo00016.gif" >
                                                                                <tbody>

                                                                                    <tr>                            
                                                                                        <td align="right" class="login"><strong><h:outputText  value="Nome utente" /></strong></td>
                                                                                        <td align="right"><t:inputText forceId="true" id="email" value="#{login.email}"/>
                                                                                            <td>&nbsp</td>

                                                                                            <td><br/></td>
                                                                                            <td align="right" class="login"><strong><h:outputText  value="Password"/></strong></td>
                                                                                            <td align="right"><t:inputSecret forceId="true" id="password" value="#{login.password}"/> </td>
                                                                                            <td>&nbsp</td>

                                                                                            <td><h:commandButton value="Login" action="#{azioneLogin.esegui}" /></td>


                                                                                    </tr>

                                                                                    <tr>
                                                                                        <td colspan="6" align="center" class="messaggiErroreBig"><strong><h:messages /></strong>&nbsp;</td>
                                                                                    </tr>


                                                                                </tbody>
                                                                            </table>
                                                                        </h:form>


                                                                    </tbody>
                                                                </table>
                                                                <input type="hidden" value="1" name="form_SUBMIT">
                                                                    <input type="hidden" name="autoScroll">
                                                                        <input type="hidden" value="175" name="jsf_sequence"><input type="hidden" name="form:_link_hidden_" value="">
                                                                                <script type="text/javascript">& lt;
                                                                                    !--
                                                                                            function clear_form() {
                                                                                                var f = document.forms['form'];
                                                                                                f.elements['form:_link_hidden_'].value = '';
                                                                                                f.target = '';
                                                                                            }
                                                                                    clear_form();
                                                                                                                                    //--&gt;</script>
                                                                                </form>
                                                                                </div>
                                                                                </div>
                                                                                </div>

                                                                                <div class="navbar navbar-default" role="navigation">
                                                                                    <div class="navbar-header">
                                                                                        <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
                                                                                            <span class="sr-only">Toggle navigation</span>
                                                                                            <span class="icon-bar"></span>
                                                                                            <span class="icon-bar"></span>
                                                                                            <span class="icon-bar"></span>
                                                                                        </button>
                                                                                    </div>

                                                                                    <div class="navbar-collapse collapse">
                                                                                        <ul class="nav navbar-nav">
                                                                                            <li class='active'><a href="home.jsf">Home</a></li> 
                                                                                            <li><a href="chisiamo.jsf">Chi siamo</a></li>
                                                                                            <li><a href="flotta.jsf">Flotta</a></li>
                                                                                            <li><a href="contatti.jsf">Contatti</a></li>
                                                                                            <li><a href="news.jsf">News</a></li>

                                                                                            <li><a class="active" href="login.jsf">Registrati</a> </li>


                                                                                        </ul>
                                                                                    </div>
                                                                                </div> 

                                                                                <div class="row">
                                                                                    <div class="col-md-12">
                                                                                        <div class="slider">
                                                                                            <ul class="bxslider">
                                                                                                <li><img src="immagini/slider/2.jpg" /></li>
                                                                                                <li><img src="immagini/slider/1.jpg" /></li>
                                                                                            </ul>
                                                                                        </div>

                                                                                        <div class="form_home">
                                                                                            <t:saveState value="#{beanAppPrenotazione}"/>

                                                                                            <h:form>          
                                                                                                <table style="height: 200px; width:250px; background-color:  orange;">
                                                                                                    <tr>                   
                                                                                                        <td align="center">
                                                                                                            <t:selectOneRadio id="ar" value="#{beanAppPrenotazione.ar}" onchange="submit()" >
                                                                                                                <f:selectItem itemValue="A" itemLabel="Solo Andata" />
                                                                                                                <f:selectItem itemValue="R" itemLabel="Andata/Ritorno"/>
                                                                                                            </t:selectOneRadio>  
                                                                                                        </td>
                                                                                                    </tr> 

                                                                                                    <tr>
                                                                                                        <td>
                                                                                                            <h:outputText value="Da:" style="font-size:7pt"/>
                                                                                                            <br/> 
                                                                                                            <h:selectOneMenu id="da" value="#{beanAppPrenotazione.idComunePartenza}" onchange="submit()" style=" width:90%;">
                                                                                                                <f:selectItems value="#{beanAppPrenotazione.listaPartenze}" />
                                                                                                            </h:selectOneMenu>           
                                                                                                        </td>
                                                                                                    </tr>
                                                                                                    <tr>
                                                                                                        <td>
                                                                                                            <h:outputText value="A:" style="font-size:7pt"/>
                                                                                                            <br/>
                                                                                                            <h:selectOneMenu id="a" value="#{beanAppPrenotazione.idComuneArrivo}" style=" width:90%;">
                                                                                                                <f:selectItems value="#{beanAppPrenotazione.listaArrivi}" />
                                                                                                            </h:selectOneMenu>           
                                                                                                        </td>
                                                                                                    </tr>

                                                                                                    <tr> 
                                                                                                        <td><h:outputText value="Data di Partenza" style="font-size: 8pt"/>
                                                                                                            <br/>
                                                                                                            <t:inputDate id="dataPartenza" popupCalendar="false" size="10" styleClass="campoTesto" value="#{beanAppPrenotazione.dataPartenza}">
                                                                                                                <f:convertDateTime pattern="dd/MM/yyyy" type="both" timeZone="Europe/Rome"/>
                                                                                                            </t:inputDate>
                                                                                                            <h:message style="color: red" for="dataPartenza" showDetail="true" showSummary="false" />
                                                                                                        </td>
                                                                                                    </tr>   

                                                                                                    <tr> 
                                                                                                        <td><h:outputText value="Data di Ritorno" style="font-size: 8pt"/>
                                                                                                            <br/>
                                                                                                            <t:inputDate id="dataRitorno" popupCalendar="false" size="10" styleClass="campoTesto" value="#{beanAppPrenotazione.dataRitorno}">
                                                                                                                <f:convertDateTime pattern="dd/MM/yyyy" type="both" timeZone="Europe/Rome"/>
                                                                                                            </t:inputDate>
                                                                                                            <h:message style="color: red" for="dataRitorno" showDetail="true" showSummary="false" />
                                                                                                        </td>
                                                                                                    </tr>  


                                                                                                    <tr>                   
                                                                                                        <td>
                                                                                                            <h:outputText value="Passeggeri" style="font-size:8pt"/>
                                                                                                            <br/>
                                                                                                            <t:inputText id="numPasseggeri" value="#{beanAppPrenotazione.numPasseggeri}" styleClass="dettaglio_InputText" onchange="this.value=this.value.toUpperCase()" size="5" maxlength="2" required="true"/>
                                                                                                            <h:message style="color: red" for="numPasseggeri" showDetail="true" showSummary="false" /></td>
                                                                                                    </tr>  

                                                                                                    <tr>                   
                                                                                                        <td>
                                                                                                            <h:outputText value="Date Flessibili" style="font-size:8pt"/>
                                                                                                            <br/>
                                                                                                            <h:selectBooleanCheckbox id="dateFlessibili" value="#{beanAppPrenotazione.dataFlessibili}" styleClass="dettaglio_InputText" />
                                                                                                            <h:message style="color: red" for="dateFlessibili" showDetail="true" showSummary="false" /></td>
                                                                                                    </tr>  

                                                                                                    <td align="right">
                                                                                                        <t:commandButton action="#{dettaglioPrenotazione.ricerca}" value="Ricerca">
                                                                                                        </t:commandButton>
                                                                                                    </td>

                                                                                                </table>
                                                                                            </h:form>   
                                                                                            <h:form id="erroriDataBase" rendered="false" style="background-color:  white; width:250px;">
                                                                                                <f:verbatim><table><td align="left" class="messaggiErrore" height="2px"></f:verbatim>           
                                                                                                        <h:messages style="color: red" showDetail="true" showSummary="false"/>
                                                                                                        <f:verbatim></td></table></f:verbatim>
                                                                                                    </h:form> 
                                                                                        </div>
                                                                                    </div>
                                                                                </div>	


                                                                                <jsp:include page="footerPortale.jsp"/>



                                                                                <script src="js/jquery-1.11.0.min.js"></script>		
                                                                                <script src="js/bootstrap.min.js"></script>	
                                                                                <script src="js/jquery.bxslider.min.js"></script>

                                                                                <script type="text/javascript">
                                                                                                                                                                    $(document).ready(function() {
                                                                                                                                                                        $('.bxslider').bxSlider({
                                                                                                                                                                            controls: false,
                                                                                                                                                                            mode: 'horizontal',
                                                                                                                                                                            easing: 'linear',
                                                                                                                                                                            speed: 750
                                                                                                                                                                        });
                                                                                                                                                                    });
                                                                                </script>
                                                                                </body>
                                                                                </html>
                                                                            </f:view >
